<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格练习</title>
</head>
<body>
<table border="1">
    <caption>讲课教师表</caption>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>年龄</th>
    </tr>
    <tr>
        <td>1</td>
        <td>传奇</td>
        <td>12</td>
    </tr>
    <tr>
        <td>2</td>
        <td>张三</td>
        <td>43</td>
    </tr>
    <tr>
        <td>3</td>
        <td>李四</td>
        <td>45</td>
    </tr>
</table>
<!--跨行合并rowspan,跨列合并colspan-->
<table border="1">
    <tr>
        <th>1-1</th>
        <th>1-2</th>
        <th>1-3</th>
        <th>1-4</th>
    </tr>
    <tr>
        <th colspan="2">2-1</th>
<!--        <th>2-2</th>-->
        <th>2-3</th>
        <th rowspan="3">2-4</th>
    </tr>
    <tr>
        <th>3-1</th>
        <th>3-2</th>
        <th>3-3</th>
<!--        <th>3-4</th>-->
    </tr>
    <tr>
        <th>4-1</th>
        <th>4-2</th>
        <th>4-3</th>
<!--        <th>4-4</th>-->
    </tr>

</table>
<hr>
<table border="1" style="border-collapse: collapse">
    <caption>购物车</caption>
    <tr>
        <th>商品编号</th>
        <th>商品名称</th>
        <th>商品价格</th>
    </tr>
    <tr>
        <td style="text-align: center">1</td>
        <td>小米air</td>
        <td>5877</td>
    </tr>
    <tr>
        <td>2</td>
        <td>华为mate9</td>
        <td>8877</td>
    </tr>
    <tr>
        <td>总价：</td>
        <td colspan="2">10000</td>
    </tr>

</table>

</body>
</html>